<?php
/**
 * Created by PhpStorm.
 * User: huliren<huliren0516@163.com>
 * Date: 2017/10/27
 * Time: 15:32
 */
define("SITE_AUTH", 'recom-live-num');

require '../../../common.inc.php';

use lib\core\AdminAction;

class livenum extends AdminAction
{
    public function doDefault()
    {
        if (!empty($_POST)) {
            \Center\SiteData::updateSiteData('LiveNumber', intval($_POST['LiveNum']));
        }

        $smarty = $this->app->page();
        $data = \Center\SiteData::getDataByKey('LiveNumber');
        $smarty->value('data', $data);
        $smarty->output('recom/live.tpl');
    }
}

$app->run();